import Vue from "vue";
import Router from "vue-router";
import Home from "@/views/Home/Home.vue";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      name: "home",
      component: Home,
      redirect: "/DataBox", //默认转
      children: [
        {
          path: "/DataBox",
          name: "DataBox",
          component: () => import("@/views/DataBox/DataBox.vue")
        },
        {
          path: "/FindInfo",
          name: "FindInfo",
          component: () => import("@/views/FindInfo/FindInfo.vue")
        },
        {
          path: "/WorkBench",
          name: "WorkBench",
          component: () => import("@/views/WorkBench/WorkBench.vue")
        },
        {
          path: "/SubScribe",
          name: "SubScribe",
          component: () => import("@/views/SubScribe/SubScribe.vue")
        },
        {
          path: "/Mine",
          name: "Mine",
          component: () => import("@/views/Mine/Mine.vue")
        }
      ]
    },
    {
      path: "/Login",
      name: "Login",
      component: () => import("@views/Login/Login.vue")
    }
  ]
});
